home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
3_0
/
CUTILSLI
/
UTILITYL
/
PSTRCOPY.C
< prev
next >
Wrap
Text File
|
1987-11-10
|
1KB
|
29 lines
/*********************************************
* Filename: pStrCopy.c
* Purpose: Pascal String Copy
* Authors: Robert E. Neville
* Date: November 5, 1987
* Functions: pStrCopy().
* Version 1.0
* Copyright 1987 Hummingbird Graphics
*********************************************/
/****************************************************************
* Function: pStrCopy(p1,p2)
* Purpose: Copy contents of String 1 to String 2
* Passed: p1 - Ptr to Str1
p2 - Ptr to String 2
* Returned: Nothing.
*****************************************************************/
pStrCopy(p1, p2)
register char *p1, *p2; /* Ptrs to p1 and p2 */
{
register int len; /* The length of string */
len = *p2++ = *p1++; /* Get the number of chars */
while(--len >= 0) /* While string length more than 0 */
*p2++ = *p1++; /* Move the next char of p1 to p2 */
}
/********** End of File **********/